import request from '@/utils/request'
import config from '@/utils/config'

// 新增征集活动
export function addActivity(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/add',
    method: 'post',
    data: params
  })
}

// 分页查询征集活动管理
export function getActivityList(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/queryPage',
    method: 'get',
    params: params
  })
}

// 更新活动状态
export function ActivityEditStatus(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/editStatus',
    method: 'post',
    data: params
  })
}

// 更新推荐状态
export function ActivityEditRecommendStatus(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/editRecommendStatus',
    method: 'post',
    data: params
  })
}

// 查询征集活动管理详情
export function getActivityInfo(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/queryInfo',
    method: 'get',
    params: params
  })
}

// 分页查询活动作品
export function getActivityWork(params) {
  return request({
    url: config.BaseUrl + '/activity/work/queryPage',
    method: 'get',
    params: params
  })
}

// 查询征集活动作品详情
export function getActivityWorkDetail(params) {
  return request({
    url: config.BaseUrl + '/activity/work/queryInfo',
    method: 'get',
    params: params
  })
}

// 更新小程序端显示已征集数量状态
export function editShowNumStatus(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/editShowNumStatus',
    method: 'post',
    data: params
  })
}

// 更新开启状态
export function editOpenStatus(params) {
  return request({
    url: config.BaseUrl + '/activity/manage/editOpenStatus',
    method: 'post',
    data: params
  })
}

// 征集活动颁奖
export function activityAward(params) {
  return request({
    url: config.BaseUrl + '/activity/work/award',
    method: 'post',
    data: params
  })
}
